#{extends 'main.html' /}
#{set title:'Event details' /}
#{set 'moreScripts'}
<script type="text/javascript">
$(document).ready( function() {
	$('a.lightbox').lightBox();
});
</script>
#{/set}

<h3>Details of <span class="highlighted">${event.name}</span></h3><br>
<p>popularity: ${event.clicks}</p>
<a class="lightbox" href="@{Events.showPicture(event.id)}"><img height="100" width="100" src="@{Events.showPicture(event.id)}"></a>
<br><br>
<p>${event.description}</p>

#{if event.endDate == event.startDate}
	<p>on ${event.startDate.format('dd.MM.yyyy')}</p>
#{/if}
#{else}
	<p>from ${event.startDate.format('dd.MM.yyyy')} to ${event.endDate.format('dd.MM.yyyy')}</p>
#{/else}

<p>${event.city} #{if event.zipcode}(${event.zipcode})#{/if}<br>
#{if event.street && event.streetNumber}${event.street} ${event.streetNumber}#{/if}</p>

#{if event.eventlink}
<a class = "text" href="http://${event.eventlink}">&nbsp;Website&nbsp;</a>
#{/if}

#{if user && user.isAdmin()}
<a class = "text" href="@{Events.edit(event.id)}">&nbsp;edit event&nbsp;</a>
	#{if !event.isActive}
	<a class = "text" href="@{Events.activate(event.id)}">&nbsp;activate&nbsp;</a>
	#{/if}
#{/if}
<br><br>
<a class="showOffers" href="@{Application.showOffers(event.id, 0, 0, true)}">&nbsp;Offers&nbsp;</a>
